﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Parallel3M.parallel3m.handler;
using System.Collections;

namespace Parallel3M.parallel3m.function
{
   /*
    <payload timestamp='' routeTag='*' domain='*' type='request' handlerid='CSHARP_RUN' access='Public' language='c#'>
        <request>
            <function>Parallel3M.parallel3m.function.GetTextLength</function>
            <text>this is a test for the graph.</text>
         </request>
         <response/>
     </payload>
    */
    public class GetTextLength : parallel3m.handler.ParalleClassRunInterface
    {
        public string function(Hashtable parameters)
        {
            string text = (string)parameters["text"];
            string output = "<textlength>" + text.Length + "</textlength>";
            Console.WriteLine("payload handle:" + output);
            return output;
        }
    }
}
